gtk4.git
6 years agoRemove GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
Emmanuele Bassi [Sat, 22 Feb 2020 14:54:48 +0000 (14:54 +0000)]
Remove GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER

We don't need a whole separate action, now that the file chooser widget
can create folders; we can create use SELECT_FOLDER and create one.

6 years agoRemove GtkFileChooser:local-only
Emmanuele Bassi [Fri, 21 Feb 2020 16:44:39 +0000 (16:44 +0000)]
Remove GtkFileChooser:local-only

Now that the whole API goes through GFile we don't have the weird split
between local-only and non-local-only modes.

6 years agoRemove GtkFileChooser:show-hidden
Emmanuele Bassi [Fri, 21 Feb 2020 16:28:31 +0000 (16:28 +0000)]
Remove GtkFileChooser:show-hidden

This is a user setting and a user action, not something that ought to be
programmatically set via the file selection API.

6 years agoRemove overwrite confirmation machinery from GtkFileChooser
Emmanuele Bassi [Fri, 21 Feb 2020 15:52:47 +0000 (15:52 +0000)]
Remove overwrite confirmation machinery from GtkFileChooser

Overwrite confirmation should not be optional, and it should not loop
into application code to create their own dialog and user response.

6 years agoDrop GtkFileChooser:extra-widget
Emmanuele Bassi [Fri, 21 Feb 2020 15:34:37 +0000 (15:34 +0000)]
Drop GtkFileChooser:extra-widget

We have "choices" as a more rational (and portable) API; additionally,
the ownership semantics of the extra widget property getter are a hack.

6 years agoRemove filename/URI API from GtkFileChooser
Emmanuele Bassi [Fri, 21 Feb 2020 15:11:15 +0000 (15:11 +0000)]
Remove filename/URI API from GtkFileChooser

GtkFileChooser's API predates GIO by a few years, so it started off with
filenames and URI as character arrays. After introducing GIO as a
dependency, the API included GFile-based entry points.

It's much more appropriate to use GFile everywhere, as we want to
encourage people to use GIO instead of passing random bytes to low level
POSIX API.

See: #2455

6 years agoMerge branch 'wip/otte/dnd' into 'master'
Benjamin Otte [Sat, 22 Feb 2020 14:53:13 +0000 (14:53 +0000)]
Merge branch 'wip/otte/dnd' into 'master'

stuff

See merge request GNOME/gtk!1460

6 years agoRemove GdkSeatGrabPrepareFunc from headers
Matthias Clasen [Sat, 22 Feb 2020 03:18:05 +0000 (22:18 -0500)]
Remove GdkSeatGrabPrepareFunc from headers

It is not used in public api anymore.

6 years agoAdd a warning when a grab fails
Matthias Clasen [Sat, 22 Feb 2020 03:03:28 +0000 (22:03 -0500)]
Add a warning when a grab fails

This reveals that the grabs for popover menus
always fail now, causing the menus to not properly
hide.

6 years agotests: Guard variables with necessary macros
Benjamin Otte [Sat, 22 Feb 2020 06:44:16 +0000 (07:44 +0100)]
tests: Guard variables with necessary macros

6 years agotreeviewcolumn: Inline variable into return_if_fail()
Benjamin Otte [Sat, 22 Feb 2020 06:42:13 +0000 (07:42 +0100)]
treeviewcolumn: Inline variable into return_if_fail()

6 years agotestsuite: Don't use g_return_if_fail()
Benjamin Otte [Sat, 22 Feb 2020 06:41:14 +0000 (07:41 +0100)]
testsuite: Don't use g_return_if_fail()

Use g_assert()

6 years agotestsuite: Don't use return_if_fail()
Benjamin Otte [Sat, 22 Feb 2020 06:35:23 +0000 (07:35 +0100)]
testsuite: Don't use return_if_fail()

Use assert() instead

6 years agotreeview: Guard code by right compiler macros
Benjamin Otte [Sat, 22 Feb 2020 06:08:39 +0000 (07:08 +0100)]
treeview: Guard code by right compiler macros

6 years agoscrolledwindow: Inline variable into return_if_fail()
Benjamin Otte [Sat, 22 Feb 2020 06:06:55 +0000 (07:06 +0100)]
scrolledwindow: Inline variable into return_if_fail()

6 years agoiconview: Inline variables into return_if_fail()
Benjamin Otte [Sat, 22 Feb 2020 06:01:55 +0000 (07:01 +0100)]
iconview: Inline variables into return_if_fail()

6 years agolevelbar: Guard function by right compiler macros
Benjamin Otte [Sat, 22 Feb 2020 06:01:38 +0000 (07:01 +0100)]
levelbar: Guard function by right compiler macros

6 years agofilesystemmodel: Guard variable with correct compiler flags
Benjamin Otte [Sat, 22 Feb 2020 05:58:32 +0000 (06:58 +0100)]
filesystemmodel: Guard variable with correct compiler flags

6 years agocombobox: Inline variables into return_if_fail()
Benjamin Otte [Sat, 22 Feb 2020 05:57:32 +0000 (06:57 +0100)]
combobox: Inline variables into return_if_fail()

6 years agocomboboxtext: Inline functions into return_if_fail()
Benjamin Otte [Sat, 22 Feb 2020 05:55:08 +0000 (06:55 +0100)]
comboboxtext: Inline functions into return_if_fail()

6 years agodevice: Inline function into return_if_fail()
Benjamin Otte [Sat, 22 Feb 2020 05:53:46 +0000 (06:53 +0100)]
device: Inline function into return_if_fail()

6 years agodrop: Guard variable with correct compiler flags
Benjamin Otte [Sat, 22 Feb 2020 05:53:16 +0000 (06:53 +0100)]
drop: Guard variable with correct compiler flags

6 years agosurface: Inline function
Benjamin Otte [Sat, 22 Feb 2020 05:50:58 +0000 (06:50 +0100)]
surface: Inline function

Fixes compile error with -DG_DISBALE_CHECKS

6 years agomain: Don't synthesize crossing events when nothing changed
Benjamin Otte [Sat, 22 Feb 2020 03:27:06 +0000 (04:27 +0100)]
main: Don't synthesize crossing events when nothing changed

This was especially bad because it was confusing the event controllers
so much, they'd emit leave + enter events every time the mouse moved.

6 years agostackswitcher: Use GdkDropControllerMotion
Benjamin Otte [Sat, 22 Feb 2020 03:16:42 +0000 (04:16 +0100)]
stackswitcher: Use GdkDropControllerMotion

... and use one controller per button instead of using it on the
switcher and then going through lots of pain attempting to find the
right button for the location under the mouse.

6 years agoPort simple cases to GtkDropControllerMotion
Benjamin Otte [Sat, 22 Feb 2020 03:09:02 +0000 (04:09 +0100)]
Port simple cases to GtkDropControllerMotion

6 years agotestsuite: Check proper notify emissions, too
Benjamin Otte [Sat, 22 Feb 2020 03:05:22 +0000 (04:05 +0100)]
testsuite: Check proper notify emissions, too

This is in particular relevant for the ::is-focus property, because
updating that one doesn't cause enter/leave events.

But it also checks that notify and enter/leave happen in the right
order.

6 years agoAdd GtkDropControllerMotion
Benjamin Otte [Fri, 21 Feb 2020 23:58:57 +0000 (00:58 +0100)]
Add GtkDropControllerMotion

6 years agoeventcontrollermotion: Fix docs
Benjamin Otte [Fri, 21 Feb 2020 22:26:36 +0000 (23:26 +0100)]
eventcontrollermotion: Fix docs

6 years agogtk: Bubble drag events like motion events
Benjamin Otte [Wed, 19 Feb 2020 03:44:41 +0000 (04:44 +0100)]
gtk: Bubble drag events like motion events

Emit crossing events - with a new GTK_CROSSING_DROP type - like we do
for motion events. There is no more special casing for them.

Note that the gesture has not been updated yet, so some obscure behavior
may occur.

6 years agoevents: Use GdkDrop as event sequence
Benjamin Otte [Wed, 19 Feb 2020 03:43:03 +0000 (04:43 +0100)]
events: Use GdkDrop as event sequence

This allows treating drop events like touch events, which GTK groups by
event sequence.

It's a bit ugly that we just case the GdkDrop pointer, but event
sequences are only meant to be unique pointer ids, so it's fine.

6 years agowidget: Simplify adjust_allocation()
Benjamin Otte [Sat, 22 Feb 2020 04:46:58 +0000 (05:46 +0100)]
widget: Simplify adjust_allocation()

And in particular, only do it if the widget doesn't use ALIGN_FILL.

This avoids lots of measuring in the common case and speeds up
size_allocate() by about 25%.

And because size_allocate() is the bottleneck in the fishbowl, this also
gets ~25% more fishies.

6 years agowidget: Pull margin computation out of adjust_allocation
Benjamin Otte [Sat, 22 Feb 2020 04:25:14 +0000 (05:25 +0100)]
widget: Pull margin computation out of adjust_allocation

It's way cheaper to just do it.

Also simplifies adjust_size_allocation a lot.

6 years agosizerequest: Stop clamping for_size to natural size
Benjamin Otte [Sat, 22 Feb 2020 04:23:41 +0000 (05:23 +0100)]
sizerequest: Stop clamping for_size to natural size

Widgets should be given the actual size they will be allocated, so they
can do something with it.

If they want to clamp themselves to their natural size, nothing's
stopping them, they know their natural size after all.

6 years agowidget: Don't check for natives
Benjamin Otte [Sat, 22 Feb 2020 01:47:41 +0000 (02:47 +0100)]
widget: Don't check for natives

It's the native's job to request a 1px x 1px size, not the job of
gtk_widget_size_allocate()

Also saves 10% of size_allocate() time because checking for an interface
is really expensive.

6 years agoEnsure all natives request at least a 1px wide surface
Benjamin Otte [Sat, 22 Feb 2020 03:49:52 +0000 (04:49 +0100)]
Ensure all natives request at least a 1px wide surface

FIXME: Is this necessary?

Could the surfaces just clamp to 1x1 themselves?
We recently declared that surfaces can decide on whatever size they want
so natives need to inspect the size they requested anyway.

6 years agoMerge branch 'color-float-fix' into 'master'
Matthias Clasen [Sat, 22 Feb 2020 03:19:01 +0000 (03:19 +0000)]
Merge branch 'color-float-fix' into 'master'

color chooser: Fix fallout from floatification

See merge request GNOME/gtk!1459

6 years agocolor chooser: Fix fallout from floatification
Matthias Clasen [Sat, 22 Feb 2020 00:56:44 +0000 (19:56 -0500)]
color chooser: Fix fallout from floatification

We are using (dddd) variants to store colors in variants,
which is dangerous now that GdkRGBA members are just floats.

Avoid passsing the GdkRGBA members directly to any varargs
functions.

6 years agoMerge branch 'wip/xdg-popup-layout-no-op' into 'master'
Matthias Clasen [Sat, 22 Feb 2020 00:27:59 +0000 (00:27 +0000)]
Merge branch 'wip/xdg-popup-layout-no-op' into 'master'

gdk/wayland: Avoid relayout with the same properties

See merge request GNOME/gtk!1457

6 years agoMerge branch 'wip/gdkpopuplayout-section' into 'master'
Matthias Clasen [Sat, 22 Feb 2020 00:26:42 +0000 (00:26 +0000)]
Merge branch 'wip/gdkpopuplayout-section' into 'master'

docs: Add GdkPopupLayout to gdk4-sections.txt

See merge request GNOME/gtk!1458

6 years agodocs: Add GdkPopupLayout to gdk4-sections.txt
Jonas Ã…dahl [Fri, 21 Feb 2020 22:24:38 +0000 (23:24 +0100)]
docs: Add GdkPopupLayout to gdk4-sections.txt

6 years agogdk/wayland: Avoid relayout with the same properties
Jonas Ã…dahl [Fri, 21 Feb 2020 20:30:42 +0000 (21:30 +0100)]
gdk/wayland: Avoid relayout with the same properties

When a popup is already showing, and gdk_surface_present_popup() is
called, if the layout didn't change, we're not really interested in
relayouting.

In the future, we'll be able to get notified if position of the popup
would change by some environmental changes, but until then, just don't
support it.

6 years agogdk/popup-layout: Remove leftover struct field
Jonas Ã…dahl [Fri, 21 Feb 2020 20:28:03 +0000 (21:28 +0100)]
gdk/popup-layout: Remove leftover struct field

The layouts never "seal", as they did in an earlier revision, so remove
the seal field.

6 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Fri, 21 Feb 2020 20:35:47 +0000 (20:35 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

surface: Don't take a display argument in gdk_surface_new_popup()

See merge request GNOME/gtk!1456

6 years agosurface: Don't take a display argument in gdk_surface_new_popup()
Benjamin Otte [Fri, 21 Feb 2020 20:13:09 +0000 (21:13 +0100)]
surface: Don't take a display argument in gdk_surface_new_popup()

The display can be taken from the surface, it must not be different.

6 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Fri, 21 Feb 2020 18:24:56 +0000 (18:24 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

Wip/otte/for master

See merge request GNOME/gtk!1455

6 years agotransform: Don't crash for gsk_transform_transform (id, id)
Benjamin Otte [Fri, 21 Feb 2020 17:30:13 +0000 (18:30 +0100)]
transform: Don't crash for gsk_transform_transform (id, id)

See attached tests

6 years agotransform: Make sure the identity transform is equal to NULL
Benjamin Otte [Fri, 21 Feb 2020 17:25:05 +0000 (18:25 +0100)]
transform: Make sure the identity transform is equal to NULL

6 years agox11: When clearing old Drop, emit LEAVE event
Benjamin Otte [Wed, 19 Feb 2020 03:41:28 +0000 (04:41 +0100)]
x11: When clearing old Drop, emit LEAVE event

This can happen when the old DND operation died (like due to a crash or
a broken XWayland compositor.

6 years agogdk: Make DRAG_ENTER event take x/y coordinates
Benjamin Otte [Wed, 19 Feb 2020 02:37:23 +0000 (03:37 +0100)]
gdk: Make DRAG_ENTER event take x/y coordinates

Make it mirror the behavior of ENTER/LEAVE events.

6 years agotransform: Add optimization for common case
Benjamin Otte [Wed, 19 Feb 2020 23:02:19 +0000 (00:02 +0100)]
transform: Add optimization for common case

Transforming identity by an other transform does not mean we need to
painstakingly apply the individual steps of other to construct a new
transform, it means we can just return other.

Or in math terms:
  I * B = B
so just return B.

6 years agoUpdate POTFILES.in
Piotr DrÄ…g [Fri, 21 Feb 2020 17:11:15 +0000 (18:11 +0100)]
Update POTFILES.in

6 years agoprofiling: Avoid one extra printf
Matthias Clasen [Fri, 21 Feb 2020 12:26:19 +0000 (07:26 -0500)]
profiling: Avoid one extra printf

We already format the message, no need to use
printf again to combine that with the kind string.

6 years agoprofiling: Avoid criticals
Matthias Clasen [Fri, 21 Feb 2020 12:23:40 +0000 (07:23 -0500)]
profiling: Avoid criticals

With events no longer GObjects, the type class is
longer around for peeking.

6 years agoMerge branch 'readonly-events-1' into 'master'
Matthias Clasen [Fri, 21 Feb 2020 06:18:25 +0000 (06:18 +0000)]
Merge branch 'readonly-events-1' into 'master'

Redo events

See merge request GNOME/gtk!1443

6 years agodocs: Remove some no-longer existing api
Matthias Clasen [Fri, 21 Feb 2020 02:29:00 +0000 (21:29 -0500)]
docs: Remove some no-longer existing api

6 years agoStop exporting gtk_get_event_widget
Matthias Clasen [Fri, 21 Feb 2020 02:28:05 +0000 (21:28 -0500)]
Stop exporting gtk_get_event_widget

This is non-essential convenience API, and we
don't really expose events to applications anymore.

6 years agogtk-demo: Stop using gtk_get_event_widget
Matthias Clasen [Fri, 21 Feb 2020 02:27:26 +0000 (21:27 -0500)]
gtk-demo: Stop using gtk_get_event_widget

This is convenience api that will be going away.

6 years agogdk: Drop event structs from the headers
Matthias Clasen [Fri, 21 Feb 2020 02:22:16 +0000 (21:22 -0500)]
gdk: Drop event structs from the headers

All events are GdkEvents now.

6 years agogtk: Stop using GtkEventButton
Matthias Clasen [Fri, 21 Feb 2020 02:21:45 +0000 (21:21 -0500)]
gtk: Stop using GtkEventButton

Same as the previous commit. All events are
just GdkEvents now.

6 years agogtk: Stop using GdkEventKey
Matthias Clasen [Fri, 21 Feb 2020 02:21:08 +0000 (21:21 -0500)]
gtk: Stop using GdkEventKey

We should just use GdkEvent, instead of taking
a GdkEventKey, and then cast it everywhere.

6 years agoa11y: drop unused code
Matthias Clasen [Fri, 21 Feb 2020 02:20:05 +0000 (21:20 -0500)]
a11y: drop unused code

We are no longer using key snoopers.

6 years agomotion controller: Match focus event propagation
Matthias Clasen [Fri, 21 Feb 2020 04:20:58 +0000 (23:20 -0500)]
motion controller: Match focus event propagation

Make the crossing event generation for pointer events
match what we do for focus now.

6 years agoKeep more event controller api private
Matthias Clasen [Thu, 20 Feb 2020 22:22:03 +0000 (17:22 -0500)]
Keep more event controller api private

We don't want to expose the GtkCrossingData struct, and manually
feeding events to event controllers is not something we want to
encourage, going forward.

6 years agoStop exporting check_event_sanity
Matthias Clasen [Thu, 20 Feb 2020 22:13:21 +0000 (17:13 -0500)]
Stop exporting check_event_sanity

6 years agoBring back im context focus-in/out
Matthias Clasen [Thu, 20 Feb 2020 12:30:15 +0000 (07:30 -0500)]
Bring back im context focus-in/out

The key controller still needs to track focus,
in order to emit these signals when required.

6 years agoGo back to ::enter/::leave for pointer changes
Matthias Clasen [Thu, 20 Feb 2020 03:04:28 +0000 (22:04 -0500)]
Go back to ::enter/::leave for pointer changes

These signals are behaving a little differently from
what ::focus-in/::focus-out used to do.

6 years agoSplit off GtkEventControllerFocus
Matthias Clasen [Thu, 20 Feb 2020 01:51:03 +0000 (20:51 -0500)]
Split off GtkEventControllerFocus

Split the focus tracking into a separate
GtkEventControllerFocus, and change the API one more time.
We are back to having ::focus-in and ::focus-out signals.

Update all users.

6 years agowip: Add more information to crossing events
Matthias Clasen [Wed, 19 Feb 2020 04:30:16 +0000 (23:30 -0500)]
wip: Add more information to crossing events

Add fields for direct descendents to GtkCrossingData,
and populate them when emitting focus change events.

Also add accessors for these fields to GtkEventControllerKey,
and verify that they are set properly in the focus test.

Not done yet: Do the same for pointer crossing events.

6 years agowin32: Remove some leftover event struct access
Matthias Clasen [Tue, 18 Feb 2020 05:38:55 +0000 (00:38 -0500)]
win32: Remove some leftover event struct access

And leftover old event api calls.

6 years agowayland: Fix a release build warning
Matthias Clasen [Tue, 18 Feb 2020 05:40:48 +0000 (00:40 -0500)]
wayland: Fix a release build warning

6 years agoUpdate the focus test
Matthias Clasen [Tue, 18 Feb 2020 05:12:59 +0000 (00:12 -0500)]
Update the focus test

This needs an update to handle the new focus-change signal.

6 years agoUpdate event docs section
Matthias Clasen [Tue, 18 Feb 2020 04:45:06 +0000 (23:45 -0500)]
Update event docs section

6 years agoClean up GdkEventType docs
Matthias Clasen [Tue, 18 Feb 2020 04:44:35 +0000 (23:44 -0500)]
Clean up GdkEventType docs

6 years agoSome event struct packing improvements
Matthias Clasen [Tue, 18 Feb 2020 04:08:44 +0000 (23:08 -0500)]
Some event struct packing improvements

Rearrange a few things, and move some booleans
into the Any struct, by using a bitfield there.

Some more cleanup could be done - the flags field
with its PENDING and FLUSHED members appears
entirely unused. Nobody is setting those flags.

6 years agoStreamline event structs
Matthias Clasen [Tue, 18 Feb 2020 03:20:01 +0000 (22:20 -0500)]
Streamline event structs

Use proper types (GdkModifierType, double), and drop
some unused fields (send_event, display).

6 years agox11: Remove some leftover event struct access
Matthias Clasen [Tue, 18 Feb 2020 04:20:05 +0000 (23:20 -0500)]
x11: Remove some leftover event struct access

6 years agox11: Stop using the send_event event field
Matthias Clasen [Tue, 18 Feb 2020 03:18:56 +0000 (22:18 -0500)]
x11: Stop using the send_event event field

The only use of this field is printing it out in a
debug message. We are going to drop it.

6 years agoAlways deliver focus events to toplevels
Matthias Clasen [Mon, 17 Feb 2020 14:17:42 +0000 (09:17 -0500)]
Always deliver focus events to toplevels

Its was GTK expects. This change gets rid of the "Ignoring an
unexpected focus event from GDK on a non-toplevel surface."
warning.

6 years agoDrop gtk_widget_event from API
Matthias Clasen [Mon, 17 Feb 2020 12:40:31 +0000 (07:40 -0500)]
Drop gtk_widget_event from API

We don't want events to be injected randomly from
the outside. Plus, there's no way to create such
events from the outside now.

6 years agoevents: reorganize getters
Matthias Clasen [Tue, 18 Feb 2020 03:11:56 +0000 (22:11 -0500)]
events: reorganize getters

Restructure the getters for event fields to
be more targeted at particular event types.

Update all callers, and replace all direct
event struct access with getters.

As a side-effect, this drops some unused getters.

6 years agoDrop gdk_set/get_show_events
Matthias Clasen [Tue, 18 Feb 2020 03:11:03 +0000 (22:11 -0500)]
Drop gdk_set/get_show_events

We don't need a separate api to turn on debugging
for events.

6 years agoStrip const from GdkEvent
Matthias Clasen [Sun, 16 Feb 2020 16:09:02 +0000 (11:09 -0500)]
Strip const from GdkEvent

Events are refcounted structs, and we generally don't
pass these as const.

6 years agoevents: Drop all setters
Matthias Clasen [Sun, 16 Feb 2020 07:53:44 +0000 (02:53 -0500)]
events: Drop all setters

GdkEvent is now truly readonly.

6 years agoevents: Drop target and related target
Matthias Clasen [Sun, 16 Feb 2020 07:50:34 +0000 (02:50 -0500)]
events: Drop target and related target

GTK no longer uses this, so we can drop it.

6 years agomain: Stop calling gdk_event_set_target
Matthias Clasen [Sun, 16 Feb 2020 07:50:09 +0000 (02:50 -0500)]
main: Stop calling gdk_event_set_target

GTK is no longer relying on this.

6 years agoStop using gdk_event_get_target
Matthias Clasen [Sun, 16 Feb 2020 07:47:39 +0000 (02:47 -0500)]
Stop using gdk_event_get_target

We can now get the target widget from the gesture
that we are using to find the event in the first
place.

6 years agogesture: Keep the target widget for events
Matthias Clasen [Sun, 16 Feb 2020 07:46:40 +0000 (02:46 -0500)]
gesture: Keep the target widget for events

We already store the events; keep the target widget
in addition. This is a step towards getting rid of
gdk_event_get_target.

6 years agoeventcontroller: Make the target widget available
Matthias Clasen [Sun, 16 Feb 2020 07:46:05 +0000 (02:46 -0500)]
eventcontroller: Make the target widget available

Make it possible for event controllers to obtain
the target widget during handle_event.

6 years agoExplicitly pass the target to handle_event
Matthias Clasen [Sun, 16 Feb 2020 07:20:34 +0000 (02:20 -0500)]
Explicitly pass the target to handle_event

Pass the event propagation target explicitly down to
the event controllers. This is a step towards getting
rid of gdk_event_set_target.

6 years agoStop looking at the related target for filtering
Matthias Clasen [Sun, 16 Feb 2020 06:50:39 +0000 (01:50 -0500)]
Stop looking at the related target for filtering

We are now sending crossing events (which are the only ones
where a related target makes sense) via handle_crossing.

6 years agoReinstate filtering for crossing events
Matthias Clasen [Sun, 16 Feb 2020 06:48:50 +0000 (01:48 -0500)]
Reinstate filtering for crossing events

The event propagation limit should apply to crossing events
as well.

6 years agoMake crossing events handled the same way
Matthias Clasen [Sun, 16 Feb 2020 01:47:23 +0000 (20:47 -0500)]
Make crossing events handled the same way

6 years agoNew focus change handling
Matthias Clasen [Thu, 13 Feb 2020 01:26:29 +0000 (20:26 -0500)]
New focus change handling

Instead of relying on gdk's antiquated crossing events,
create a new GtkCrossingData struct that contains the
actual widgets, and a new event controller vfunc that
expects this struct. This also saves us from making sense
of X's crossing modes and details, and makes for a
generally simpler api.

The ::focus-in and ::focus-out signals of GtkEventControllerKey
have been replaced by a single ::focus-change signal that
takes GtkCrossingData as an argument. All callers have
been updated.

6 years agowip: scrolledwindow stop using targets
Matthias Clasen [Sun, 16 Feb 2020 04:33:17 +0000 (23:33 -0500)]
wip: scrolledwindow stop using targets

6 years agomain: Drop gtk_get_event_target
Matthias Clasen [Sun, 16 Feb 2020 02:04:58 +0000 (21:04 -0500)]
main: Drop gtk_get_event_target

This is no longer used.

6 years agotooltip: stop using gtk_get_event_target
Matthias Clasen [Tue, 18 Feb 2020 02:21:05 +0000 (21:21 -0500)]
tooltip: stop using gtk_get_event_target

6 years agoStop using gtk_get_event_target
Matthias Clasen [Sun, 16 Feb 2020 02:04:08 +0000 (21:04 -0500)]
Stop using gtk_get_event_target

This is just a thin wrapper around gdk_event_get_target,
so use that directly.

6 years agoPass translated coordinates outside the event
Matthias Clasen [Thu, 13 Feb 2020 05:08:49 +0000 (00:08 -0500)]
Pass translated coordinates outside the event

We want to make events readonly, so stop translating
their coordinates and instead pass the translated
coordinates separately, when propagating events.

6 years agoDrop GDK_NOTHING
Matthias Clasen [Sun, 16 Feb 2020 05:39:11 +0000 (00:39 -0500)]
Drop GDK_NOTHING

Events of type GDK_NOTHING are good for nothing.